<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Log in</title>
<!--
<h1>
	<div class="header" align="center">
		Welcome to the blogger's guild
	</div>
</h1> -->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" >
function validate(){
	var uname = document.forms["loginform"]["username"].value;
	var pwd = document.forms["loginform"]["password"].value;
	
	
	if (uname==null || uname == ""){
		alert("Enter your username.");
		return false;
	}
	else if (pwd==null || pwd == ""){
		alert("Enter your password.");
		return false;	
	}
}
</script>
<style type="text/css">

.loginboxes{
position: absolute;
margin-top:15em;
margin-left:35em;
font-family: Helvetica;
}

.thetable{
margin-left:5em;
margin-right:10em;
margin-top:15em;
height:200px; 
width:400px; 
box-shadow:0px 30px 300px 50px black;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}

td{
color:black;
align:center;
margin-left:1em;
}
</style>
{% load staticfiles %}
<link rel="stylesheet" href="{% static "css/base.css" %}" type="text/css" media="screen" />
</head>

<body>
	<div align="center">
	
	<form name="loginform" action="/blogit/" method="post">{% csrf_token %}
		<table class="thetable">
		<tr><td>
			<div align="center">
			<table>
			<tr><td>{{message}}</td></tr>
			<tr>
				<td align="right">Username</td>
				<td align="right"><input type="text" name="username"></td>
			</tr>
			<tr>
				<td align="right">Password </td>
				<td align ="right"><input type="password" name="password"></td>
			</tr>
			</table>
			<table>
				<tr>
				<td align="center"><button name="" type="submit" onclick="validate()">Login</button><br><br></td>
			</tr>
			</table>
			</div>
				<div align="center">
			<table>
			<tr>
				<td align="right">New users register <a href="/register/">here</a></td><br>
				<td align="right">Forgot password? Click <a href="/resetpassword/">here</a></td>
			</tr>
			</table></div>
		</td></tr>
		</table>
	</form>
	</div>	
	
	</body>
</html>
